<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8" />
		<meta name="viewport" content="width=device-width,initial-scale=1.0">
		<title></title>
		<link href="css/index.css" rel="stylesheet" />
	</head>
	<body>
	<div class="wrapOrderInfo">
		<div class="headTitle">
		<img onclick="goback()" src="./img/leftArrow.jpg" />
		<p>包含订单</p>
       	</div>
	 	<span class="spanText">1张发票(含2个订单)</span> 
		<ul>
			<!--<li v-for='item of containList'>
				<p class="pTop"><span>市民卡充值</span><small></small></p>
				<p class="pBottom"><span></span><small>元</small></p>
			</li>
				<li>
				<p class="pTop"><span>市民卡充值</span><small>2010222222</small></p>
				<p class="pBottom"><span>451561561651</span><small>100元</small></p>
			</li>-->
		</ul>

	</div>

<script src="js/jquery.min.js"></script>
<script type="text/javascript" src="js/oldPublic.js" ></script>
<script src="js/code.js"></script>
<script src="js/security.js"></script>
<script>
	var login_name = sessionStorage.getItem('login_name');
	var telphone = sessionStorage.getItem('telphone');
	var orgcode = sessionStorage.getItem('orgcode');
	var apply_seqno = window.location.href.split('?')[1].split('=')[1];
  			$.ajax({
				type:"post",
				//url:"http://36.32.24.54:8080/hft-server/test",
				url:sessionStorage.getItem('ipconfig'),
				data:JSON.stringify({data:encryptByDESModeEBC(JSON.stringify({"tag": "9106", 'login_name': login_name, 'telphone': telphone, 'apply_seqno': apply_seqno,'orgcode':orgcode}))}),
				contentType: "application/json;charset=utf-8",
				success:function(data){
					console.log(data);
					if(data.result=='00'){
						var dataList = JSON.parse(data.invoice_detail);
						var length =dataList.length;
						var str = '';
						$('.spanText').html('1张发票(含'+length+'个订单)');
						for(var i=0;i<length;i++){
							str+='<li>'+
								'<p class="pTop"><span>'+cardType(dataList[i].inntype)+'</span><small>'+dataFrom(dataList[i].txndate)+'</small></p>'+
								'<p class="pBottom"><span>'+dataList[i].acct_no+'</span><small>'+dataList[i].txnamt+'元</small></p>'+
								'</li>'
						}
						$('ul').html(str);
					}
				}
			});
			
		function cardType(type){
		var text='';
		if(type=='5163'){
			text='充值交易'
		}else if(type=='2063'){
			text='售卡交易'
		}
		return text;
		}
		
		function dataFrom(data){
			var year = data.substring(0,4);
			var month = data.substring(4,6);
			var day = data.substring(6,8);
			return year+'年'+month+'月'+day+'日'
		}
	
</script>



</body>
</html>
